<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FishmatchDropItemRecord extends Model
{
    public $table = 'FishmatchDropItemRecord';//表名
    protected $primaryKey = 'ID';//主键
    public $timestamps = false;//指定是否模型应该被戳记时间。
    protected $connection = 'qpRecord';

    /**
     * 用户信息
     * @return $this
     */
    public function accountInfo(){
        return $this->belongsTo('App\Models\AccountsInfo', 'UserID', 'UserID')->select('UserID' , 'GameID' ,'PlatformID' , 'NickName');
    }

    /**
     * 游戏场名称
     * @return $this
     */
    public function gameRoom(){
        return $this->belongsTo('App\Models\GameRoomInfo', 'ServerID', 'ServerID')->select('ServerID' , 'ServerName' ,'NodeID');
    }

    /**
     * 道具信息
     * @return $this
     */
    public function itemInfo(){
        return $this->belongsTo('App\Models\GameItemConfig', 'ItemID', 'ID')->select('ID' , 'Name');
    }
}
